package com.example.chirdrenserver.Service.AdminService;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.chirdrenserver.Pojo.dto.admin.AdminUserQueryDTO;
import com.example.chirdrenserver.Pojo.entity.User;

import java.util.List;
import java.util.Map;

public interface UserService extends IService<User> {
    IPage<User> getUserPage(AdminUserQueryDTO queryDTO);
    User getUserById(Long userId);
    User getUserByEmail(String email);
    List<User> searchByNickname(String nickname);
    List<User> list();
    User getUserByNickname(String nickname);
    boolean deleteUser(Long userId);

    // 角色管理方法 (使用 Integer 类型角色ID)
    boolean assignRoles(Long userId, List<Integer> roleIds);
    List<Integer> getUserRoleIds(Long userId);

    // 新增：批量获取用户角色ID
    Map<Long, List<Integer>> getUserRoleIdsBatch(List<Long> userIds);
}